package com.example.chatgpt;

import android.app.Application;
import android.util.Log;

import com.example.chatgpt.bean.ApiData;
import com.example.chatgpt.bean.User;
import com.example.chatgpt.dao.MessageDao;
import com.example.chatgpt.dao.UserDao;
import com.example.chatgpt.database.MessageDataBase;

public class MyApplication extends Application {

    public MessageDao messageDao;
    public UserDao userDao;

    public ApiData apiData;
    public User userInfo;



    @Override
    public void onCreate() {
        super.onCreate();
        Log.d("guaimiao" , "onCreate");
        messageDao = MessageDataBase.getInstance(getApplicationContext()).getMessageDao();
        userDao = MessageDataBase.getInstance(getApplicationContext()).getUserDao();
        apiData = new ApiData();
        userInfo = new User();
    }

    public MessageDao getMessageDao() {
        return messageDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public ApiData getApiData() {
        return apiData;
    }

    public User getUserInfo() {
        return userInfo;
    }

}
